package com.chinasoft.pollution_analysis;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * 纯Web API启动类 - 不加载Spark依赖
 * 用于只启动REST API服务，不依赖大数据组件
 */
@SpringBootApplication(scanBasePackages = {
    "com.chinasoft.pollution_analysis.controller",
    "com.chinasoft.pollution_analysis.service", 
    "com.chinasoft.pollution_analysis.mapper"
})
public class WebOnlyApplication {
    public static void main(String[] args) {
        // 强制排除Spark相关的日志
        System.setProperty("org.slf4j.simpleLogger.defaultLogLevel", "error");
        System.setProperty("spark.master", "local[1]");
        
        SpringApplication app = new SpringApplication(WebOnlyApplication.class);
        // 禁用Banner减少启动时间
        app.setBannerMode(org.springframework.boot.Banner.Mode.OFF);
        app.run(args);
    }
}

